# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=gxde-desktop-base-git
pkgver=2021.1.25.r0.g2388ac2
pkgrel=1
pkgdesc='Base component for Deepin'
arch=('any')
url="https://github.com/linuxdeepin/gxde-desktop-base"
license=('GPL3')
groups=('deepin-git')
conflicts=('gxde-desktop-base')
provides=('gxde-desktop-base')
groups=('deepin-git')
makedepends=('git')
source=("source.tar.gz"
        distribution.info)
sha512sums=('SKIP'
            '27625e6d0786b8adacdb7c52806d4faa28d2ab6b319a593b3ea9bcb69f0cc18ea19b258d629e3a0069ef9a69503589b0285289caef39a1e85bbd99e915c7cd7d')

prepare() {
    cd $deepin_source_name
}

build() {
  cd $deepin_source_name
  make
}

package() {
  cd $deepin_source_name
  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir"/distribution.info -t "$pkgdir"/usr/share/deepin/
  # Remove Deepin distro's lsb-release
  rm "$pkgdir"/etc/lsb-release
  # Don't override systemd timeouts
  rm -r "$pkgdir"/etc/systemd
  # Make a symlink for deepin-version
  ln -s ../usr/lib/deepin/desktop-version "$pkgdir"/etc/deepin-version
  # Remove apt-specific templates
  rm -r "$pkgdir"/usr/share/python-apt
}
